import { post } from '@/utils/request'

// 获取有效权限树
export const getPageList = p => post(`/service-upms/b/permission/v1/queryEffectiveList`, p, 'get')
// 获取有效权限树
export const getCpPermissionList = p => post(`/service-upms/b/cpPermission/v1/queryAllEffectiveTreeList`, p, 'get')
// 获取收藏夹权限树
export const getUserPermissionFavorityList = p => post(`/service-upms/b/permission/v1/queryUserPermissionFavorityList`, p, 'get')
// 查询用户常用功能Id列表
export const queryUserPermissionFavorityByUserId = p => post(`/service-upms/b/permission/v1/queryUserPermissionFavorityByUserId`, p, 'get')
// 查询用户常用功能Id列表
export const updateUserPermissionFavority = p => post(`/service-upms/b/permission/v1/updateUserPermissionFavority`, p)
// 获取三方有效权限树组
export const getCpTpPermissionGroupList = p => post(`/service-upms/b/cpTpPermission/v1/queryAllEffectiveGroup`, p)
// 获取三方有效权限树组
export const getCpTpPermissionByGroup = p => post(`/service-upms/b/cpTpPermission/v1/queryCpTpPermissionByGroupId/${p.groupId}`, p)
// 保存权限树组
export const addTpPermissionGroup = p => post(`/service-upms/b/cpTpPermission/v1/addTpPermissionGroup`, p)
// 保存权限树组
export const delTpPermissionGroup = p => post(`/service-upms/b/cpTpPermission/v1/delTpPermissionGroup/${p.id}`, p, 'get')
// 保存权限树
export const addTpPermission = p => post(`/service-upms/b/cpTpPermission/v1/addTpPermission`, p)
// 保存权限树
export const delTpPermission = p => post(`/service-upms/b/cpTpPermission/v1/delTpPermission/${p.id}`, p, 'get')
